package com.adou.d3;

public class ArrDemo {
    public static void main(String[] args) {
        // 变量实现 70变量

        // 批量数组存储和操作


        // 初始化数组1
        int ages[] = new int[]{20,19,21};
        double scores[] = new double[]{89.5,59.5,88,80};
        double scores2[] = {89.5,59.5,88,80};

        // 数组名后面
        double[] scores3 = {89.5,59.5,88,80};

        // 数组访问2
        System.out.println(ages[1]);


        // 数组遍历3
        for (int age : ages) {
            System.out.println(age);

        }

    }
}
